import type { I_BatchSave, I_Push, I_Query } from "./kingdeeTypes";
import requset from "./request";
// 登录
export const kingdeeLogin = (params : any) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc`,
		params
	);
// 保存
export const kingdeeSave = (params : any) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.common.kdsvc`,
		params
	);
// 批量保存
export const kingdeeBatchSave = (params : I_BatchSave) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.BatchSave.common.kdsvc`,
		params
	);
// 提交
export const kingdeeSubmit = (params : any) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit.common.kdsvc`,
		params
	);
// 审核
export const kingdeeAudit = (params : any) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit.common.kdsvc`,
		params
	);
// 查看
export const kingdeeView = (params : any) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.View.common.kdsvc`,
		params
	);
// 下推
export const kingdeePush = (params : I_Push) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Push.common.kdsvc`,
		params
	);
// 删除
export const kingdeeDelete = (params : any) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Delete.common.kdsvc`,
		params
	);
// 单据查询
export const kingdeeQuery = (params : I_Query) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.BillQuery.common.kdsvc`,
		{
			data: params,
		}
	);
// 反审核
export const kingdeeUnAudit = (params : any) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.UnAudit.common.kdsvc`,
		params
	);
// 附件下载
export const kingdeeDownLoad = (params : any) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.AttachmentDownLoad.common.kdsvc`,
		{
			data: params,
		}
	);
// 附件上传(绑定单据)
export const kingdeeAttachmentUpLoad = (params : any) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.AttachmentUpLoad.common.kdsvc`,
		{
			data: params,
		}
	);
// 附件上传(不绑定单据)
export const kingdeeUploadFile = (params : any) =>
	requset.post(
		`/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.UploadFile.common.kdsvc`,
		{
			data: params,
		}
	);